
package cup.modules.visual.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import cup.core.tool.utils.BeanUtil;
import cup.modules.visual.dto.VisualLogDTO;
import cup.modules.visual.entity.VisualLog;
import cup.modules.visual.mapper.VisualLogMapper;
import cup.modules.visual.service.IVisualLogService;
import org.springframework.stereotype.Service;

/**
 * 服务实现类
 *
 * @author CUP
 */
@Service
public class VisualLogServiceImpl extends ServiceImpl<VisualLogMapper, VisualLog> implements IVisualLogService {

	@Override
	public VisualLogDTO detail(Long id) {
		VisualLog log = this.getById(id);
		return BeanUtil.copy(log, VisualLogDTO.class);
	}

	@Override
	public IPage<VisualLogDTO> selectVisualLogPage(IPage<VisualLogDTO> page, VisualLogDTO visualLog) {
		return page.setRecords(baseMapper.selectVisualLogPage(page, visualLog));
	}
}
